<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>FicusJS basic example</title>
</head>
<body>
<hello-world></hello-world>
<script type="module">
  import { createComponent } from 'https://cdn.skypack.dev/ficusjs@3/component'
  import { html, renderer } from 'https://cdn.skypack.dev/@ficusjs/renderers/lit-html'

  createComponent('hello-world', {
    renderer,
    handleClick (e) {
      window.alert('Hello to you!')
    },
    render () {
      return html`
      <div>
        <p>FicusJS hello world</p>
        <button type="button" @click="${this.handleClick}">Click me</button>
      </div>
    `
    }
  })
</script>
</body>
</html>